﻿<UserControl x:Class="P2.Cuberry.Modules.SimpleAccounting.FiAccount.FiAccountsFindView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Margin="0" MinWidth="230" Width="Auto" MinHeight="230" Height="250">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid Keyboard.KeyDown="Control_KeyDown">

        <Grid.Resources>
            
        </Grid.Resources>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="28"/>
            <RowDefinition Height="4" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="2" />
        </Grid.RowDefinitions>


        <Menu Grid.Column="0" Grid.Row="0" x:Name="menuMain" Height="25" VerticalAlignment="Top" Background="{DynamicResource MyBlueBackgroundGradientBrush}"  >
            <MenuItem x:Name="btnFiAccountFind" Margin="2,4,0,2"  Header="{Translate FiAccountFind}" Command="{Binding FiAccountFindCommand}" Style="{StaticResource P2FindMenuItemStyleFind}"/>
            <MenuItem x:Name="btnFiAccountClr" Margin="2,4,0,2"  Header="{Translate FiAccountClr}"  Command="{Binding FiAccountClrCommand}" Style="{StaticResource P2FindMenuItemStyleClear}"/>            
            <MenuItem x:Name="btnFiAccountAdd" Margin="2,4,0,2"  Header="{Translate FiAccountAdd}" Command="{Binding FiAccountAddCommand}" Style="{StaticResource P2FindMenuItemStyleAdd}"/>
        </Menu>

        <Label Grid.Row="2"  Height="23" Margin="0,0,0,0" Name="fiAccountNoL" VerticalAlignment="Top" HorizontalAlignment="Left" Width="86" Tag="SxL" Content="{Translate fiAccountNoL}"></Label>
        <TextBox Grid.Row="2" Height="23" Margin="90,0,8,0" Name="fiAccountNo" Text="{Binding FiAccountNo}" VerticalAlignment="Top" Tag="SxInt" Style="{StaticResource P2TextBoxStyle}" />

        <Label Grid.Row="2" Height="23" Margin="1,25,0,0" Name="fiAccountNameL"  VerticalAlignment="Top" HorizontalAlignment="Left" Width="86" Tag="SxL" Content="{Translate fiAccountNameL}"></Label>
        <TextBox Grid.Row="2" Height="23" Margin="90,25,8,0" Name="fiAccountName"  Text="{Binding FiAccountNameCur}" VerticalAlignment="Top" Tag="SxText" Style="{StaticResource P2TextBoxStyle}" />

        <Label Grid.Row="2" Height="23" Margin="1,55,0,0" Name="fiAccountFiscalYearIDL" HorizontalAlignment="Left" VerticalAlignment="Top" Width="86" Tag="SxL"  Content="{Translate fiAccountFiscalYearIDL}"></Label>
        <ComboBox Grid.Row="2" Height="23" Margin="90,55,9,0" Name="fiAccountFiscalYearID" ItemsSource="{Binding FiscalYears}" SelectedValue="{Binding Path=FiAccountFiscalYearID , ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}"  Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Style="{StaticResource P2ComboBoxStyle}" SelectedValuePath="FiscalYearID" DisplayMemberPath="FiscalYearName"  VerticalAlignment="Top" Tag="SxDDL" />

        <Label Grid.Row="2" Height="23" Margin="1,80,0,0" Name="fiAccountTypeIDL" HorizontalAlignment="Left" Width="86" Tag="SxL" VerticalAlignment="Top"  Content="{Translate fiAccountTypeIDL}"></Label>
        <ComboBox Grid.Row="2" Height="23" Margin="90,80,9,0" Name="fiAccountTypeID" ItemsSource="{Binding Path=AccountTypes}" SelectedValue="{Binding Path=FiAccountTypeID}"  SelectedValuePath="FiAccountTypeID" DisplayMemberPath="FiAccountTypeNameCur" Tag="SxDDL" VerticalAlignment="Top" Style="{StaticResource P2ComboBoxStyle}" />

        <Label Grid.Row="2" Height="23" Margin="1,110,0,0" Name="fiAccountLevelL"  VerticalAlignment="Top" HorizontalAlignment="Left" Width="86" Tag="SxL" Content="{Translate AccountLevelL}"></Label>
        <ComboBox Grid.Row="2" Height="23" Margin="90,110,8,0" Name="fiAccountLevel"  Text="{Binding FiAccountLevel}" VerticalAlignment="Top" Tag="SxText" Style="{StaticResource P2ComboBoxStyle}">
            <ComboBoxItem>1</ComboBoxItem>
            <ComboBoxItem>2</ComboBoxItem>
            <ComboBoxItem>3</ComboBoxItem>
            <ComboBoxItem>4</ComboBoxItem>
            <ComboBoxItem>5</ComboBoxItem>
        </ComboBox>
        
        <Label Grid.Row="2" Height="23" Margin="1,140,0,0" Name="StatusNameL" HorizontalAlignment="Left" Width="86" Tag="SxL" VerticalAlignment="Top"  Content="{Translate StatusNameL}"></Label>        
        <ComboBox Grid.Row="2" Height="23" Margin="90,140,9,0" Name="Status" ItemsSource="{Binding WorkflowStatusses}" SelectedValue="{Binding StatusID}" VerticalAlignment="Top" SelectedValuePath="StatusID" DisplayMemberPath="StatusNameCur" Style="{StaticResource P2ComboBoxStyle}" />
        
        <CheckBox Grid.Row="2" Height="16" Margin="100,0,10,5" Name="chargeable" IsChecked="{Binding Chargeable}" VerticalAlignment="Bottom"  Content="{Translate fiAccountChargeableL}" IsThreeState="True" ></CheckBox>

    </Grid>
</UserControl>
